package com.fgba.express.data.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fgba.express.comm.enums.MenuType;
import com.fgba.express.comm.enums.State;
import com.fgba.express.core.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 菜单Dto
 * </p>
 *
 * @author fgba
 * @since 2022-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(value = JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "MenuDto对象", description = "菜单Dto")
public class MenuDto extends BaseDto {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "父菜单ID，一级菜单为0")
    private Integer parentId;

    @ApiModelProperty(value = "菜单名称")
    private String name;

    @ApiModelProperty(value = "菜单标题")
    private String title;

    @ApiModelProperty(value = "菜单URL")
    private String path;

    @ApiModelProperty(value = "授权(多个用逗号分隔，如：user:list,user:create)")
    private String perms;

    @ApiModelProperty(value = "菜单组件名称")
    private String component;

    @ApiModelProperty(value = "类型     0：目录   1：菜单   2：按钮")
    private MenuType type;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "排序")
    private Integer orderNum;

    @ApiModelProperty(value = "是否展开")
    private Boolean expand;

    @ApiModelProperty(value = "是否关闭缓存")
    private Boolean notCache;

    @ApiModelProperty(value = "是否在菜单栏中隐藏")
    private Boolean hideInMenu;

    /**
     * 如果是根据角色获取菜单时，该值为角色是否有该菜单权限
     */
    @ApiModelProperty(value = "状态")
    private Boolean checked;

    /**
     * 状态，0为删除，1为正常，2为禁用
     */
    @ApiModelProperty(value = "状态")
    private State state;
}
